package net.zjitc.service;

import net.zjitc.domain.Admin;
import net.zjitc.domain.Category;
import net.zjitc.domain.CategorySecond;
import net.zjitc.domain.User;

import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

/**
 * Created by guo on 2017/11/11.
 */
public interface Service {
    Admin fingUsernameAndPassword(String username, String password);

    List<User> findAll();

    int delete(int uid);

    List<Category> findAllCategory();

    int addCategory(Category category);

    int deleteCategory(int cid);

    Category findCategoryId(int cid);

    int updateCategory(Category category);

    List<CategorySecond> findAllCategorySecond();


    int deleteSecondById(int csid);

    CategorySecond findCategorySecondId(String csid) throws IllegalAccessException, SQLException, InvocationTargetException;

    int addCategorySecond(CategorySecond categorySecond);
}
